package com.mikgonz.farkle.database;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = "requests")
public class Request {
	
	@DatabaseField(useGetSet = true , canBeNull = false, id = true)
	private String name;
	
	@DatabaseField(useGetSet = true , canBeNull = false)
	private Long serverId;
	
	@DatabaseField(useGetSet = true, canBeNull = false)
	private Integer isIncoming;
	
	public Request(){}

	public Request(String name, Long serverId, Integer isIncoming) {
		super();
		this.name = name;
		this.serverId = serverId;
		this.isIncoming = isIncoming;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getServerId() {
		return serverId;
	}

	public void setServerId(Long serverId) {
		this.serverId = serverId;
	}

	public Integer getIsIncoming() {
		return isIncoming;
	}

	public void setIsIncoming(Integer isIncoming) {
		this.isIncoming = isIncoming;
	}
  
	public boolean isIncoming(){
		return isIncoming > 0;
	}
	
	
	 

}
